#ifndef __PCBQUEUE_H_
#define __PCBQUEUE_H_

#include "rtx_inc.h"
#include "pcb.h"

#define NUM_PRIORITIES 4

typedef struct pcb_queue {
	PCB* head;
	PCB* tail;
} PCB_QUEUE;

typedef struct pcb_priority_queue {
	PCB_QUEUE queues[NUM_PRIORITIES];
} PCB_PRIORITY_QUEUE;

VOID enqueue_pcb(PCB_QUEUE* queue, PCB* pcb);
PCB* dequeue_pcb(PCB_QUEUE* queue);

VOID priority_enqueue(PCB_PRIORITY_QUEUE* priority_queue, PCB* process);
PCB* priority_dequeue(PCB_PRIORITY_QUEUE* priority_queue);
SINT32 priority_remove(PCB_PRIORITY_QUEUE* priority_queue, PCB* process);

VOID rpq_enqueue(PCB* process);
PCB* rpq_dequeue();
SINT32 rpq_remove(PCB* process);

#endif
